package com.gaoyuzhe.feign;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * @author gaoyuzhe
 */
@FeignClient(name = "CLOUD-PROVIDER-HYSTRIX-PAYMENT8001",fallbackFactory = PaymentHystrixFallbackImpl.class)
public interface PaymentHystrixFeignService {
    @RequestMapping("/payment/hystrix/paymentOk/{id}")
    String paymentOk(@PathVariable("id") Integer id);

    /**
     * 超时测试案例
     *
     * @param id id
     * @return 结果
     */
    @RequestMapping("/payment/hystrix/paymentTimeout/{id}")
    String paymentTimeout(@PathVariable("id") Integer id);

}
